package cn.itcast.dtx.seatademo.bank1.service;

import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Description :
 * @Version : V1.0.0
 * @Date : 2022/7/1 15:18
 */
@Service
public class TestGlobalTransService {

    @Resource
    private TestOnlyTransService service;

    @GlobalTransactional
    public void testTrans() throws Exception {
        service.insertUser();

        service.insertOrder();
//        throw new Exception("test exception");
    }
}
